import { IOption } from './common'
import { IPagination } from './pagination'
import { IQueryParams } from './queryParams'

export interface IBatchImportResult {
  insCode: string
  fileName: string
  fileKey: string
  result: number // 0失败 1部分成功  2成功
  type: string //  AddMerchant AddStore AddTerminal
  feedback: string // 批导反馈⽂文件在第三⽅方存储服务器器上的key
  creator: string // 执行者
  createdAt: string
}

export interface IBatchImportFile {
  filename: string
  size: string | number
  status: string
  msg: string
}

export interface ISampleReportPagination {
  url: string
}

export const levelOption: IOption[] = [
  {
    label: 'BATCH.IMPORT.MERCHANT',
    value: 'merchant',
  },
  {
    label: 'BATCH.IMPORT.STORE',
    value: 'store',
  },
  {
    label: 'BATCH.IMPORT.TERMINAL',
    value: 'terminal',
  },
]
export interface IBathImportPagination extends IPagination {
  data: IBatchImportResult[]
}

export interface IBatchQueryParams extends IQueryParams {
  filename: string
}
